<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="verydows-baseurl" content="<{$common.baseurl}>">
<title>付款 - <{$GLOBALS.cfg.site_name}></title>
<link rel="stylesheet" type="text/css" href="<{$common.theme}>/css/general.css" />
<link rel="stylesheet" type="text/css" href="<{$common.theme}>/css/order.css" />
<script type="text/javascript" src="<{$common.baseurl}>/public/script/jquery.js"></script>
<script type="text/javascript" src="<{$common.theme}>/js/general.js"></script>
<script type="text/javascript">
function showPaymentSelect(){
  $('#payment-select span').hide();
  $('#payment-select select').show();
}

function changePayment(e){
  if(e.value != '<{$order.payment_method}>') $('#change-payment-form').submit();
}

function doPay(){
  window.open("<{$payment.url nofilter}>");
  var popup = $('#uponpay');
  $.vdsMasker(true);
  popup.vdsMidst().show().find('a.close').click(function(){
    $.vdsMasker(false);
    popup.hide();
  });
}
</script>
</head>
<body>
<!-- 顶部开始 -->
<{layout_topper common=$common}>
<!-- 顶部结束 -->
<!-- 头部开始 -->
<div class="header">
  <div class="w1100 cut">
    <div class="logo"><a href="<{url c='main' a='index'}>"><img src="<{$common.theme}>/images/logo.gif" /></a></div>
  </div>
</div>
<!-- 头部结束 -->
<!-- 主体开始 -->
<div class="container w1100 mt30">
  <div class="paybox">
    <div class="payinfo">
      <table>
        <tr>
          <th width="80">订单编号：</th>
          <td><{$order.order_id}></td>
        </tr>
        <tr>
          <th>订单金额：</th>
          <td><b class="red"><{$order.order_amount}></b></td>
        </tr>
        <tr>
          <th>付款方式：</th>
          <td id="payment-select">
            <span><font><{$payment.name}></font><a class="f12 sm-gen ml10 pointer" onclick="showPaymentSelect()">更改付款方式</a></span>
            <form method="post" action="<{url c='pay' a='index' order_id=$order.order_id}>" id="change-payment-form">
              <select name="change_payment" class="slt hide" onchange="changePayment(this)">
                <{foreach $payment_list as $v}> <option value="<{$v.id}>"<{if $order.payment_method == $v.id}> selected="selected"<{/if}>><{$v.name}>
                </option>
                <{/foreach}>
              </select>
            </form>
          </td>
        </tr>
      </table>
    </div>
    <div class="paybtn mt30"><a onclick="doPay()" class="checkout-btn">立即付款</a></div>
  </div>
</div>
<!-- 主体结束 -->
<div class="cl"></div>
<!-- 页脚开始 -->
<{layout_footer}>
<!-- 页脚结束 -->
<!-- 弹出完成付款对话框开始 -->
<div class="uponpay hide" id="uponpay">
  <h2>支付提示<a class="close"><i class='icon'></i></a></h2>
  <div class="mt20 pad10"><p class="aln-c c666">请您在新打开的页面进行支付，在支付完成前请不要关闭该页面</p></div>
  <div class="mt20 aln-c"><a class="sm-red btn" href="<{url c='order' a='view' id=$order.order_id}>">已完成支付</a><a href="<{url c='help' a='view' id='4'}>" class="sm-blue btn">支付遇到问题</a></div>
</div>
<!-- 弹出完成付款对话框结束 -->
<script type="text/javascript" src="<{$common.baseurl}>/public/script/juicer.js"></script>
</body>
</html>